import home from '@/view/home/index';
import network from '@/view/network/index';
import fault from '@/view/fault';
import screen from '@/view/screen/index';
import operation from '@/view/operation/index';
import setting from '@/view/setting/index';
import warning from '@/view/warning/index';
import knowledge from '@/view/knowledge/index';
import share from '@/view/share/index';

const routes = [
  {
    path: '/home',
    name: 'home',
    title: '首页',
    icon: 'el-icon-s-home',
    component: home
  },
  {
    path: '/screen',
    name: 'screen',
    title: '大屏',
    icon: 'el-icon-monitor',
    component: screen,
    meta: {
      noHeader: true
    }
  },
  {
    path: '/fault',
    name: 'fault',
    title: '故障监控',
    onlyMenu: true,
    icon: 'el-icon-data-analysis',
    component: fault,
    children: [
      {
        path: 'monitor',
        name: 'fault_monitor',
        title: '故障管理',
        componentPath: '/fault/modules/monitor'
      },
      {
        path: 'analysis',
        name: 'fault_analysis',
        title: '分析列表',
        componentPath: '/fault/modules/analysis'
      },
      {
        path: 'query',
        name: 'fault_query',
        title: '故障查询',
        componentPath: '/fault/modules/query'
      }
    ]
  },
  {
    path: '/network',
    name: 'network',
    title: '网络结构',
    onlyMenu: true,
    icon: 'el-icon-cloudy',
    component: network,
    children: [{
      path: 'topology',
      name: 'network_topology',
      title: '网络拓扑结构',
      componentPath: '/network/modules/topology'
    }, {
      path: 'coupling',
      name: 'network_coupling',
      title: '业务通联关系',
      component: () => import('@/view/network/modules/coupling'),
    }, {
      path: 'firewall_admin',
      name: 'network_firewall_admin',
      title: '防火墙管理',
      component: () => import('@/view/network/modules/firewallAdmin'),
    }]
  },
  {
    path: '/warning',
    name: 'warning',
    title: '告警监控',
    onlyMenu: true,
    icon: 'el-icon-bell',
    component: warning,
    children: [
      {
        path: 'manage',
        name: 'warning_manage',
        title: '告警管理',
        component: () => import('@/view/warning/modules/manage'),
      },
      {
        path: 'query',
        name: 'warning_query',
        title: '告警查询',
        component: () => import('@/view/warning/modules/query'),
      }
    ]
  },
  {
    path: '/operation',
    name: 'operation',
    title: '运维监控',
    onlyMenu: true,
    icon: 'el-icon-coin',
    component: operation,
    children: [
      {
        path: 'deviceList',
        name: 'operation_deviceType',
        title: '设备分类',
        component: () => import('@/view/operation/modules/deviceList'),
      },
      {
        path: 'device_admin',
        name: 'operation_deviceList',
        title: '设备管理',
        component: () => import('@/view/operation/modules/deviceAdmin'),
      },
      {
        path: 'quotaList',
        name: 'operation_quota',
        title: '指标管理',
        component: () => import('@/view/operation/modules/quotaList'),
      },
      {
        path: 'tpList',
        name: 'operation_tpList',
        title: '模板列表',
        component: () => import('@/view/operation/modules/tpList'),
      },
      {
        path: 'template',
        name: 'operation_template',
        notMenu: true,
        component: () => import('@/view/operation/modules/temp'),
      },
      {
        path: 'task',
        name: 'operation_task',
        title: '评估任务',
        component: () => import('@/view/operation/modules/task'),
      },
      {
        path: 'task-info',
        name: 'operation_taskInfo',
        notMenu: true,
        component: () => import('@/view/operation/modules/task/taskInfo'),
      },
      {
        path: 'result-info',
        name: 'operation_resultInfo',
        notMenu: true,
        component: () => import('@/view/operation/modules/resultInfo'),
      },
      {
        path: 'result',
        name: 'operation_result',
        title: '评估结果',
        notMenu: true,
        component: () => import('@/view/operation/modules/result'),
      },
    ]
  },
  {
    path: '/knowledge',
    name: 'knowledge',
    title: '知识库',
    icon: 'el-icon-guide',
    component: knowledge
  },
  {
    path: '/share',
    name: 'share',
    component: share,
    title: '分享',
    icon: 'el-icon-share',
    children: [
      {
        path: 'content',
        name: 'share_content',
        title: '内容分享',
        component: () => import('@/view/share/modules/content'),
      }
      // {
      //     path: 'add',
      //     name: 'share_add',
      //     title: '新增分享',
      //     component: () => import('@/view/share/modules/add'),
      // }
    ]
  },
  {
    path: '/setting',
    name: 'setting',
    title: '设置',
    onlyMenu: true,
    icon: 'el-icon-setting',
    component: setting,
    children: [
      {
        path: 'user',
        title: '用户管理',
        name: 'setting_user',
        component: () => import('@/view/setting/modules/userList'),
      },
      {
        path: 'role',
        title: '角色管理',
        name: 'setting_role',
        component: () => import('@/view/setting/modules/roleList'),
      },
      {
        path: 'group',
        title: '用户组',
        name: 'setting_group',
        component: () => import('@/view/setting/modules/groupList'),
      },
      {
        path: 'setting_message_white_list',
        title: '短信白名单',
        name: 'setting_message_white_list',
        component: () => import('@/view/setting/modules/messageWhiteList'),
      },
      // {
      //     path: 'log',
      //     title: '日志设置',
      //     name: 'setting_log',
      //     component: () => import('@/view/setting/modules/log'),
      // },
      // {
      //     path: 'system',
      //     title: '系统设置',
      //     name: 'setting_system',
      //     component: () => import('@/view/setting/modules/system'),
      // }
    ]
  }
]

export default routes